/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.persistence.core;

import com.blandware.atleap.common.util.PartialCollection;
import com.blandware.atleap.common.util.QueryInfo;
import com.blandware.atleap.model.core.ActionPage;
import com.blandware.atleap.persistence.exception.DeleteException;

/**
 * <p>DAO for action page (AP)</p>
 * <p><a href="ActionPageDAO.java.html"><i>View Source</i></a></p>
 *
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.7 $ $Date: 2006/08/03 10:07:35 $
 */
public interface ActionPageDAO extends PageDAO {

	// ~ CRUD Methods ================================================================

	/**
	 * Creates new action page
	 *
	 * @param actionPage Value object that represents what page must be created
	 * @return ID of created action page
	 */
	public Long createActionPage(ActionPage actionPage);

	/**
	 * Retrieves action page with specified ID
	 *
	 * @param actionPageId ID to search by
	 * @return Action page with specified ID or null if no page with specified ID exists in database
	 */
	public ActionPage retrieveActionPage(Long actionPageId);

	/**
	 * Updates action page
	 *
	 * @param actionPage Action page to update
	 */
	public void updateActionPage(ActionPage actionPage);

	/**
	 * Deletes action page
	 *
	 * @param actionPage Page to delete
	 * @throws DeleteException if action page cannot be deleted
	 */
	public void deleteActionPage(ActionPage actionPage) throws DeleteException;

	// ~ Additional methods ================================================================

	/**
	 * Retrieves filtered/sorted collection of action pages.
	 *
	 * @param queryInfo Object that contains information about how to filter and sort data
	 * @return Collection of pages
	 */
	public PartialCollection listActionPages(QueryInfo queryInfo);

	// ~ Finders ================================================================

	/**
	 * Finds action page by URI
	 *
	 * @param actionPageUri URI of action page to search by
	 * @return Action page or null if nothing was found
	 */
	public ActionPage findActionPageByUri(String actionPageUri);


}
